import 'package:flutter/material.dart';

class Constant {
  static const String ASSETS_IMG = 'assets/images/';
  //  static const baseUrl ='http://192.168.56.1:8080/hrlweibo/';
  static const baseUrl = 'http://212.64.95.5:8080/hrlweibo/';

  static const bool ISDEBUG = true;

  static const String SP_USER = 'sp_user';

  static const String SP_KEYBOARD_HEGIHT = 'sp_keyboard_hegiht'; //软键盘高度

  static const int PAGE_SIZE = 10;

  //static final EventBus eventBus = new EventBus();

  static TextStyle buildTextStyle(
      {@required double fontSize,
      @required double lineHeight,
      @required int color}) {
    return TextStyle(
      color: Color(color),
      fontSize: fontSize,
      height: lineHeight / fontSize,
    );
  }

/* 界面元素色 */

  // 品牌色
  static const int COLOR_BRAND_PRIMARY = 0xFFF52525;
  // 品牌黑
  static const int COLOR_BRAND_BLACK = 0xFF000000;
  // 内容底色
  static const int COLOR_CONTENT_GROUND = 0xFFFFFFFF;
  // 全局底色
  static const int COLOR_GLOBAL_GROUND = 0xFFEEEEEE;
  // 分割线底色
  static const int COLOR_DIVIDER_GROUND = 0xFFF9F9F9;
  // 图标色
  static const int COLOR_ICON = 0xFFF9F9F9;
  // 文字链接可点击
  static const int COLOR_TEXT_LINK = 0xFF2995E6;
  // 提示信息
  static const int COLOR_TOAST = 0xFFE76234;
  // 错误提示
  static const int COLOR_TOAST_ERROR = 0xFFF1444D;
  // 错误提升
  static const int COLOR_TOAST_ERROR_HIGH = 0xFF00CC6A;

  /* 文字颜色 */

  // 重要文字
  static const int COLOR_TEXT_IMPORTANT = 0xFF333333;
  // 常规文字
  static const int COLOR_TEXT_NORMAL = 0xFF666666;
  // 辅助文字1
  static const int COLOR_TEXT_HELP_1 = 0xFF999999;
  // 辅助文字2
  static const int COLOR_TEXT_HELP_2 = 0xFFCCCCCC;
  // 反白字或图标
  static const int COLOR_TEXT_WHITE = 0xFFFFFFFF;

  // 强调分割线
  static const int COLOR_DIVIDER_STRONG_WHITE = 0x33FFFFFF;
  // 正常分割线
  static const int COLOR_DIVIDER_NORMAL_WHITE = 0x72FFFFFF;
  // 最弱分割线
  static const int COLOR_DIVIDER_WEEK_WHITE = 0xB2FFFFFF;

  // 强调分割线
  static const int COLOR_DIVIDER_STRONG_BLACK = 0xB2000000;
  // 正常分割线
  static const int COLOR_DIVIDER_NORMAL_BLACK = 0xE5000000;
  // 最弱分割线
  static const int COLOR_DIVIDER_WEEK_BLACK = 0xF2000000;

  /* 字号 */
  static const double FONT_SIZE_12 = 12.0;
  static const double FONT_SIZE_14 = 14.0;
  static const double FONT_SIZE_15 = 15.0;
  static const double FONT_SIZE_16 = 16.0;
  static const double FONT_SIZE_18 = 18.0;
  static const double FONT_SIZE_20 = 20.0;
  static const double FONT_SIZE_24 = 24.0;
  static const double FONT_SIZE_28 = 28.0;
  static const double FONT_SIZE_36 = 36.0;

  /* 行高 */
  static const double LINE_HEIGHT_12 = 16.0;
  static const double LINE_HEIGHT_14 = 18.0;
  static const double LINE_HEIGHT_15 = 19.0;
  static const double LINE_HEIGHT_16 = 20.0;
  static const double LINE_HEIGHT_18 = 24.0;
  static const double LINE_HEIGHT_20 = 26.0;

  /* TextStyle.height */
  static const double TEXT_STYLE_HEIGHT_12 = LINE_HEIGHT_12 / FONT_SIZE_12;
  static const double TEXT_STYLE_HEIGHT_14 = LINE_HEIGHT_14 / FONT_SIZE_14;
  static const double TEXT_STYLE_HEIGHT_15 = LINE_HEIGHT_15 / FONT_SIZE_15;
  static const double TEXT_STYLE_HEIGHT_16 = LINE_HEIGHT_16 / FONT_SIZE_16;
  static const double TEXT_STYLE_HEIGHT_18 = LINE_HEIGHT_18 / FONT_SIZE_18;
  static const double TEXT_STYLE_HEIGHT_20 = LINE_HEIGHT_20 / FONT_SIZE_20;

  /* 网格系统间距约定 */
  static const double SPACEING_4 = 4.0;
  static const double SPACEING_8 = 8.0;
  static const double SPACEING_16 = 16.0;
  static const double SPACEING_20 = 20.0;
  static const double SPACEING_40 = 40.0;
  static const double SPACEING_60 = 60.0;
}
